#import "LuminousFlexibilityController.h"
        
#import "LuminousFlexibilityModel.h"
#import "LuminousFlexibilityCell.h"
#import "Masonry.h"

@interface LuminousFlexibilityController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *quicksilverTableView;
@property (nonatomic, strong) NSMutableArray *tonicDazzleModels;

@end

@implementation LuminousFlexibilityController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self artistryInitlyout];
	[self prismrequestData];
}


//: 获取数据模型
- (void)prismrequestData {
	
}

- (void)artistryInitlyout {
    self.quicksilverTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.quicksilverTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    self.quicksilverTableView.estimatedRowHeight = 0;
    self.quicksilverTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.quicksilverTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
    self.quicksilverTableView.delegate = self;
    self.quicksilverTableView.dataSource = self;
    self.quicksilverTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    self.quicksilverTableView.showsVerticalScrollIndicator = NO;
    self.quicksilverTableView.showsHorizontalScrollIndicator = NO;
    self.quicksilverTableView.backgroundColor = UIColor.clearColor;
    [self.quicksilverTableView registerClass:[LuminousFlexibilityCell class] forCellReuseIdentifier:NSStringFromClass([LuminousFlexibilityCell class])];
    [self.view addSubview:self.quicksilverTableView];
    [self.quicksilverTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.top.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)tonicDazzleModels {
	if (!_tonicDazzleModels) {
		_tonicDazzleModels = [NSMutableArray array];
	}
	return _tonicDazzleModels;
}

#pragma mark - UITableView DataSource 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.tonicDazzleModels.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    LuminousFlexibilityCell *radiate = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([LuminousFlexibilityCell class])];
    if (radiate == nil) {
        radiate = [[LuminousFlexibilityCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([LuminousFlexibilityCell class])];
    }
    radiate.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return radiate;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
